from django.urls import path
from . import views


app_name = 'x-admin'
urlpatterns = [
    path('', views.index, name="index"),
    path('tag/', views.TagManageView.as_view()),
    path('tag/<int:tag_id>/', views.TagManageView.as_view()),
    path('hot-news/', views.HotNewsManageView.as_view()),
    path('hot-news/<int:hot_news_id>/', views.HotNewsManageView.as_view()),
    path('hot-add/', views.HotNewsAddView.as_view()),
    path('news/', views.NewsManageView.as_view()),
    path('news/<int:news_id>/', views.NewsManageView.as_view()),
    path('news/edit/<int:news_id>/', views.NewsEdit.as_view(), name="news-edit"),
    path('news/pub/', views.NewsPub.as_view(), name="news-pub"),
    path('news/image/upload/', views.image_upload, name='image_upload'),
    path('news/markdown/image/upload/', views.MarkDownUploadImage.as_view(), name='markdown_image_upload'),
    path('banner/', views.BannerManager.as_view(), name="banner-manage"),
    path('banner/<int:banner_id>/', views.BannerEdit.as_view(), name='banner-edit'),
    path('banner/pub/', views.BannerPubView.as_view(), name="banner-pub"),
    path('doc/', views.DocManageView.as_view(), name="doc-manage"),
    path('doc/<int:doc_id>/', views.DocEditView.as_view(), name='doc-edit'),
    path('docs/pub/', views.DocPubView.as_view(), name='doc-pub'),
    path('course/', views.CourseManageView.as_view(), name='course-manage'),
    path('course/<int:c_id>/', views.CourseEditView.as_view(), name='course-edit'),
    path('course/pub/', views.CoursePubView.as_view(), name='course-pub'),
    path('group/', views.GroupManageView.as_view(), name='group-manage'),
    path('group/add/', views.GroupAddView.as_view(), name='group-add'),
    path('group/<int:group_id>/', views.GroupEditView.as_view(), name='group-edit'),
    path("user/", views.UserManageView.as_view(), name="user-manage"),
    path("user/edit/<int:user_id>/", views.UserEditView.as_view(), name="user-edit")
]